# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Simon Lipp <aur@simon.lipp.name>
# Contributor: Daniel Grana <dangra@gmail.com>

pkgname=s3cmd
pkgver=2.3.0
pkgrel=2
pkgdesc="A command line client for Amazon S3"
arch=('any')
url='http://s3tools.org/s3cmd'
license=('GPL2')
depends=('python-dateutil' 'python-magic')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
optdepends=('gnupg: encrypted file storage')
source=(https://github.com/s3tools/s3cmd/releases/download/v${pkgver}/s3cmd-${pkgver}.tar.gz{,.asc})
sha512sums=('3507fb8b597617a384508149cb30bdfa8bc8a7b3705782fbf9a943c4be413dc5b7cfb3572b632e8bebbb644ab31f418428ccca996c0d2ba840ad88df1f5a406a'
            'SKIP')
validpgpkeys=(0D37A8F4A5D183D5541D85D9241769189AC3D00B)

build() {
  cd "${pkgname}-${pkgver}"
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "${pkgname}-${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
}
